#
# Copyright (C) 2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=dialtool2
PKG_RELEASE:=1

#PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)

include $(INCLUDE_DIR)/package.mk

define Package/$(PKG_NAME)
  SECTION:=tozed
  CATEGORY:=Tozed_App
  TITLE:=A Application of LTE Dail.
  MAINTAINER:=sean
  DEPENDS+= +libpthread $(CXX_DEPENDS) +kmod-4g-modules +kmod-4g-module-boardmobi +kmod-4g-module-leadercore +kmod-4g-module-quectel
endef

define Package/$(PKG_NAME)/description
  A Application of LTE Dail
endef

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
	$(CP) ./src/* $(PKG_BUILD_DIR)/
endef

define Build/Configure
endef

#	$(info "###############################################################################################")
define Package/$(PKG_NAME)/install
	$(CP) ./files/version $(1)/
	$(INSTALL_DIR) $(1)/etc/init.d
	$(INSTALL_BIN) ./files/dialtool2.init $(1)/etc/init.d/dialtool2
	$(INSTALL_DIR) $(1)/etc/
	$(INSTALL_CONF) ./files/udhcpc.script $(1)/etc/udhcpc.script
	$(INSTALL_DIR) $(1)/etc/config
	$(CP) ./files/dialtool2.config $(1)/etc/config/modem
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/dialtool_new $(1)/usr/sbin/dialtool2
endef

$(eval $(call BuildPackage,$(PKG_NAME)))
